< previous page page_39 next page >

Page 39
of time. It usually contains a description of the control's function. ToolTips are generally seen with the application's button bar; however, they also can work well in most any part of the form. Most Visual Basic controls now contain a single property for displaying ToolTipsToolTipText. It can be set at designtime in the Properties window (see Figure 1.28) or during runtime by using code similar to the following code, which would implement a ToolTip for a text box named txtHomePhone:
txtHomePhone.ToolTipText = Enter Home Phone Number as (222) 555-1212
As with other parts of the form, make sure that the text displayed clearly conveys the correct information to users.
12181-0039a.gif
Figure 1.28.
You can set ToolTip text during design time by using the
Properties window.
Try this just to see how easy it is to use. By using the demo project that you have open, select one of the command buttons on the form. In the Properties window for that control, find the ToolTipText property and change it to This is a Demo Tip. Now, run your application and move the mouse pointer over the command button you modified. After a few seconds, the ToolTip should appear (see Figure 1.29).
12181-0039b.gif
Figure 1.29.
ToolTips allow you to give users instant
suggestions or help right on the forms.

 
< previous page page_39 next page >

If you like this book, buy it!